package config;

/**
 * @Author: beisheng,
 * Date:    2022/7/7 16:22,
 * Version: IntelliJ IDEA 2021.2.1
 * 注册拦截器
 */
//@Configuration
/*public class InterceptorConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(jwtInterceptor())
                .addPathPatterns("/**")  */ // 拦截所有请求，通过判断 Token 是否合法来决定是否需要登录
//.excludePathPatterns("/user/getLogin", "/user/getLoginEmail", "/user/sendEmailCode", "/user/updateUserPass", "/user/insertUser", "/file/**", "/**/wx/**",
       // "/imserver/**", "/**/excelExport", "/**/excelImport"); //排除规则： 登录 注册 导入 导出
/*    }
    //对象注册/注入到SpringBoot容器中
    @Bean
    public JwtInterceptor jwtInterceptor(){
        return new JwtInterceptor();
    }
}*/
